3.18.88 \(\int \frac {(A+B x) (a^2+2 a b x+b^2 x^2)}{\sqrt {d+e x}} \, dx\) [1788]

Optimal. Leaf size=126 \[ -\frac {2 (b d-a e)^2 (B d-A e) \sqrt {d+e x}}{e^4}+\frac {2 (b d-a e) (3 b B d-2 A b e-a B e) (d+e x)^{3/2}}{3 e^4}-\frac {2 b (3 b B d-A b e-2 a B e) (d+e x)^{5/2}}{5 e^4}+\frac {2 b^2 B (d+e x)^{7/2}}{7 e^4} \]

[Out]

2/3*(-a*e+b*d)*(-2*A*b*e-B*a*e+3*B*b*d)*(e*x+d)^(3/2)/e^4-2/5*b*(-A*b*e-2*B*a*e+3*B*b*d)*(e*x+d)^(5/2)/e^4+2/7
*b^2*B*(e*x+d)^(7/2)/e^4-2*(-a*e+b*d)^2*(-A*e+B*d)*(e*x+d)^(1/2)/e^4

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 126, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {27, 78} \begin {gather*} -\frac {2 b (d+e x)^{5/2} (-2 a B e-A b e+3 b B d)}{5 e^4}+\frac {2 (d+e x)^{3/2} (b d-a e) (-a B e-2 A b e+3 b B d)}{3 e^4}-\frac {2 \sqrt {d+e x} (b d-a e)^2 (B d-A e)}{e^4}+\frac {2 b^2 B (d+e x)^{7/2}}{7 e^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2))/Sqrt[d + e*x],x]

[Out]

(-2*(b*d - a*e)^2*(B*d - A*e)*Sqrt[d + e*x])/e^4 + (2*(b*d - a*e)*(3*b*B*d - 2*A*b*e - a*B*e)*(d + e*x)^(3/2))
/(3*e^4) - (2*b*(3*b*B*d - A*b*e - 2*a*B*e)*(d + e*x)^(5/2))/(5*e^4) + (2*b^2*B*(d + e*x)^(7/2))/(7*e^4)

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rubi steps

\begin {align*} \int \frac {(A+B x) \left (a^2+2 a b x+b^2 x^2\right )}{\sqrt {d+e x}} \, dx &=\int \frac {(a+b x)^2 (A+B x)}{\sqrt {d+e x}} \, dx\\ &=\int \left (\frac {(-b d+a e)^2 (-B d+A e)}{e^3 \sqrt {d+e x}}+\frac {(-b d+a e) (-3 b B d+2 A b e+a B e) \sqrt {d+e x}}{e^3}+\frac {b (-3 b B d+A b e+2 a B e) (d+e x)^{3/2}}{e^3}+\frac {b^2 B (d+e x)^{5/2}}{e^3}\right ) \, dx\\ &=-\frac {2 (b d-a e)^2 (B d-A e) \sqrt {d+e x}}{e^4}+\frac {2 (b d-a e) (3 b B d-2 A b e-a B e) (d+e x)^{3/2}}{3 e^4}-\frac {2 b (3 b B d-A b e-2 a B e) (d+e x)^{5/2}}{5 e^4}+\frac {2 b^2 B (d+e x)^{7/2}}{7 e^4}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 137, normalized size = 1.09 \begin {gather*} \frac {2 \sqrt {d+e x} \left (35 a^2 e^2 (-2 B d+3 A e+B e x)+14 a b e \left (5 A e (-2 d+e x)+B \left (8 d^2-4 d e x+3 e^2 x^2\right )\right )+b^2 \left (7 A e \left (8 d^2-4 d e x+3 e^2 x^2\right )-3 B \left (16 d^3-8 d^2 e x+6 d e^2 x^2-5 e^3 x^3\right )\right )\right )}{105 e^4} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((A + B*x)*(a^2 + 2*a*b*x + b^2*x^2))/Sqrt[d + e*x],x]

[Out]

(2*Sqrt[d + e*x]*(35*a^2*e^2*(-2*B*d + 3*A*e + B*e*x) + 14*a*b*e*(5*A*e*(-2*d + e*x) + B*(8*d^2 - 4*d*e*x + 3*
e^2*x^2)) + b^2*(7*A*e*(8*d^2 - 4*d*e*x + 3*e^2*x^2) - 3*B*(16*d^3 - 8*d^2*e*x + 6*d*e^2*x^2 - 5*e^3*x^3))))/(
105*e^4)

________________________________________________________________________________________

Maple [A]
time = 0.62, size = 147, normalized size = 1.17

method result size
derivativedivides \(\frac {\frac {2 b^{2} B \left (e x +d \right )^{\frac {7}{2}}}{7}+\frac {2 \left (\left (A e -B d \right ) b^{2}+B \left (2 a b e -2 b^{2} d \right )\right ) \left (e x +d \right )^{\frac {5}{2}}}{5}+\frac {2 \left (\left (A e -B d \right ) \left (2 a b e -2 b^{2} d \right )+B \left (a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right )\right ) \left (e x +d \right )^{\frac {3}{2}}}{3}+2 \left (A e -B d \right ) \left (a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right ) \sqrt {e x +d}}{e^{4}}\) \(147\)
default \(\frac {\frac {2 b^{2} B \left (e x +d \right )^{\frac {7}{2}}}{7}+\frac {2 \left (\left (A e -B d \right ) b^{2}+B \left (2 a b e -2 b^{2} d \right )\right ) \left (e x +d \right )^{\frac {5}{2}}}{5}+\frac {2 \left (\left (A e -B d \right ) \left (2 a b e -2 b^{2} d \right )+B \left (a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right )\right ) \left (e x +d \right )^{\frac {3}{2}}}{3}+2 \left (A e -B d \right ) \left (a^{2} e^{2}-2 a b d e +b^{2} d^{2}\right ) \sqrt {e x +d}}{e^{4}}\) \(147\)
gosper \(\frac {2 \left (15 b^{2} B \,x^{3} e^{3}+21 A \,b^{2} e^{3} x^{2}+42 B a b \,e^{3} x^{2}-18 B \,b^{2} d \,e^{2} x^{2}+70 A a b \,e^{3} x -28 A \,b^{2} d \,e^{2} x +35 B \,a^{2} e^{3} x -56 B a b d \,e^{2} x +24 B \,b^{2} d^{2} e x +105 a^{2} A \,e^{3}-140 A a b d \,e^{2}+56 A \,b^{2} d^{2} e -70 B \,a^{2} d \,e^{2}+112 B a b \,d^{2} e -48 b^{2} B \,d^{3}\right ) \sqrt {e x +d}}{105 e^{4}}\) \(169\)
trager \(\frac {2 \left (15 b^{2} B \,x^{3} e^{3}+21 A \,b^{2} e^{3} x^{2}+42 B a b \,e^{3} x^{2}-18 B \,b^{2} d \,e^{2} x^{2}+70 A a b \,e^{3} x -28 A \,b^{2} d \,e^{2} x +35 B \,a^{2} e^{3} x -56 B a b d \,e^{2} x +24 B \,b^{2} d^{2} e x +105 a^{2} A \,e^{3}-140 A a b d \,e^{2}+56 A \,b^{2} d^{2} e -70 B \,a^{2} d \,e^{2}+112 B a b \,d^{2} e -48 b^{2} B \,d^{3}\right ) \sqrt {e x +d}}{105 e^{4}}\) \(169\)
risch \(\frac {2 \left (15 b^{2} B \,x^{3} e^{3}+21 A \,b^{2} e^{3} x^{2}+42 B a b \,e^{3} x^{2}-18 B \,b^{2} d \,e^{2} x^{2}+70 A a b \,e^{3} x -28 A \,b^{2} d \,e^{2} x +35 B \,a^{2} e^{3} x -56 B a b d \,e^{2} x +24 B \,b^{2} d^{2} e x +105 a^{2} A \,e^{3}-140 A a b d \,e^{2}+56 A \,b^{2} d^{2} e -70 B \,a^{2} d \,e^{2}+112 B a b \,d^{2} e -48 b^{2} B \,d^{3}\right ) \sqrt {e x +d}}{105 e^{4}}\) \(169\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)*(b^2*x^2+2*a*b*x+a^2)/(e*x+d)^(1/2),x,method=_RETURNVERBOSE)

[Out]

2/e^4*(1/7*b^2*B*(e*x+d)^(7/2)+1/5*((A*e-B*d)*b^2+B*(2*a*b*e-2*b^2*d))*(e*x+d)^(5/2)+1/3*((A*e-B*d)*(2*a*b*e-2
*b^2*d)+B*(a^2*e^2-2*a*b*d*e+b^2*d^2))*(e*x+d)^(3/2)+(A*e-B*d)*(a^2*e^2-2*a*b*d*e+b^2*d^2)*(e*x+d)^(1/2))

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 168, normalized size = 1.33 \begin {gather*} \frac {2}{105} \, {\left (15 \, {\left (x e + d\right )}^{\frac {7}{2}} B b^{2} - 21 \, {\left (3 \, B b^{2} d - 2 \, B a b e - A b^{2} e\right )} {\left (x e + d\right )}^{\frac {5}{2}} + 35 \, {\left (3 \, B b^{2} d^{2} + B a^{2} e^{2} + 2 \, A a b e^{2} - 2 \, {\left (2 \, B a b e + A b^{2} e\right )} d\right )} {\left (x e + d\right )}^{\frac {3}{2}} - 105 \, {\left (B b^{2} d^{3} - A a^{2} e^{3} - {\left (2 \, B a b e + A b^{2} e\right )} d^{2} + {\left (B a^{2} e^{2} + 2 \, A a b e^{2}\right )} d\right )} \sqrt {x e + d}\right )} e^{\left (-4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)/(e*x+d)^(1/2),x, algorithm="maxima")

[Out]

2/105*(15*(x*e + d)^(7/2)*B*b^2 - 21*(3*B*b^2*d - 2*B*a*b*e - A*b^2*e)*(x*e + d)^(5/2) + 35*(3*B*b^2*d^2 + B*a
^2*e^2 + 2*A*a*b*e^2 - 2*(2*B*a*b*e + A*b^2*e)*d)*(x*e + d)^(3/2) - 105*(B*b^2*d^3 - A*a^2*e^3 - (2*B*a*b*e +
A*b^2*e)*d^2 + (B*a^2*e^2 + 2*A*a*b*e^2)*d)*sqrt(x*e + d))*e^(-4)

________________________________________________________________________________________

Fricas [A]
time = 1.29, size = 147, normalized size = 1.17 \begin {gather*} -\frac {2}{105} \, {\left (48 \, B b^{2} d^{3} - {\left (15 \, B b^{2} x^{3} + 105 \, A a^{2} + 21 \, {\left (2 \, B a b + A b^{2}\right )} x^{2} + 35 \, {\left (B a^{2} + 2 \, A a b\right )} x\right )} e^{3} + 2 \, {\left (9 \, B b^{2} d x^{2} + 14 \, {\left (2 \, B a b + A b^{2}\right )} d x + 35 \, {\left (B a^{2} + 2 \, A a b\right )} d\right )} e^{2} - 8 \, {\left (3 \, B b^{2} d^{2} x + 7 \, {\left (2 \, B a b + A b^{2}\right )} d^{2}\right )} e\right )} \sqrt {x e + d} e^{\left (-4\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)/(e*x+d)^(1/2),x, algorithm="fricas")

[Out]

-2/105*(48*B*b^2*d^3 - (15*B*b^2*x^3 + 105*A*a^2 + 21*(2*B*a*b + A*b^2)*x^2 + 35*(B*a^2 + 2*A*a*b)*x)*e^3 + 2*
(9*B*b^2*d*x^2 + 14*(2*B*a*b + A*b^2)*d*x + 35*(B*a^2 + 2*A*a*b)*d)*e^2 - 8*(3*B*b^2*d^2*x + 7*(2*B*a*b + A*b^
2)*d^2)*e)*sqrt(x*e + d)*e^(-4)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 583 vs. \(2 (128) = 256\).
time = 25.59, size = 583, normalized size = 4.63 \begin {gather*} \begin {cases} \frac {- \frac {2 A a^{2} d}{\sqrt {d + e x}} - 2 A a^{2} \left (- \frac {d}{\sqrt {d + e x}} - \sqrt {d + e x}\right ) - \frac {4 A a b d \left (- \frac {d}{\sqrt {d + e x}} - \sqrt {d + e x}\right )}{e} - \frac {4 A a b \left (\frac {d^{2}}{\sqrt {d + e x}} + 2 d \sqrt {d + e x} - \frac {\left (d + e x\right )^{\frac {3}{2}}}{3}\right )}{e} - \frac {2 A b^{2} d \left (\frac {d^{2}}{\sqrt {d + e x}} + 2 d \sqrt {d + e x} - \frac {\left (d + e x\right )^{\frac {3}{2}}}{3}\right )}{e^{2}} - \frac {2 A b^{2} \left (- \frac {d^{3}}{\sqrt {d + e x}} - 3 d^{2} \sqrt {d + e x} + d \left (d + e x\right )^{\frac {3}{2}} - \frac {\left (d + e x\right )^{\frac {5}{2}}}{5}\right )}{e^{2}} - \frac {2 B a^{2} d \left (- \frac {d}{\sqrt {d + e x}} - \sqrt {d + e x}\right )}{e} - \frac {2 B a^{2} \left (\frac {d^{2}}{\sqrt {d + e x}} + 2 d \sqrt {d + e x} - \frac {\left (d + e x\right )^{\frac {3}{2}}}{3}\right )}{e} - \frac {4 B a b d \left (\frac {d^{2}}{\sqrt {d + e x}} + 2 d \sqrt {d + e x} - \frac {\left (d + e x\right )^{\frac {3}{2}}}{3}\right )}{e^{2}} - \frac {4 B a b \left (- \frac {d^{3}}{\sqrt {d + e x}} - 3 d^{2} \sqrt {d + e x} + d \left (d + e x\right )^{\frac {3}{2}} - \frac {\left (d + e x\right )^{\frac {5}{2}}}{5}\right )}{e^{2}} - \frac {2 B b^{2} d \left (- \frac {d^{3}}{\sqrt {d + e x}} - 3 d^{2} \sqrt {d + e x} + d \left (d + e x\right )^{\frac {3}{2}} - \frac {\left (d + e x\right )^{\frac {5}{2}}}{5}\right )}{e^{3}} - \frac {2 B b^{2} \left (\frac {d^{4}}{\sqrt {d + e x}} + 4 d^{3} \sqrt {d + e x} - 2 d^{2} \left (d + e x\right )^{\frac {3}{2}} + \frac {4 d \left (d + e x\right )^{\frac {5}{2}}}{5} - \frac {\left (d + e x\right )^{\frac {7}{2}}}{7}\right )}{e^{3}}}{e} & \text {for}\: e \neq 0 \\\frac {A a^{2} x + \frac {B b^{2} x^{4}}{4} + \frac {x^{3} \left (A b^{2} + 2 B a b\right )}{3} + \frac {x^{2} \cdot \left (2 A a b + B a^{2}\right )}{2}}{\sqrt {d}} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b**2*x**2+2*a*b*x+a**2)/(e*x+d)**(1/2),x)

[Out]

Piecewise(((-2*A*a**2*d/sqrt(d + e*x) - 2*A*a**2*(-d/sqrt(d + e*x) - sqrt(d + e*x)) - 4*A*a*b*d*(-d/sqrt(d + e
*x) - sqrt(d + e*x))/e - 4*A*a*b*(d**2/sqrt(d + e*x) + 2*d*sqrt(d + e*x) - (d + e*x)**(3/2)/3)/e - 2*A*b**2*d*
(d**2/sqrt(d + e*x) + 2*d*sqrt(d + e*x) - (d + e*x)**(3/2)/3)/e**2 - 2*A*b**2*(-d**3/sqrt(d + e*x) - 3*d**2*sq
rt(d + e*x) + d*(d + e*x)**(3/2) - (d + e*x)**(5/2)/5)/e**2 - 2*B*a**2*d*(-d/sqrt(d + e*x) - sqrt(d + e*x))/e
- 2*B*a**2*(d**2/sqrt(d + e*x) + 2*d*sqrt(d + e*x) - (d + e*x)**(3/2)/3)/e - 4*B*a*b*d*(d**2/sqrt(d + e*x) + 2
*d*sqrt(d + e*x) - (d + e*x)**(3/2)/3)/e**2 - 4*B*a*b*(-d**3/sqrt(d + e*x) - 3*d**2*sqrt(d + e*x) + d*(d + e*x
)**(3/2) - (d + e*x)**(5/2)/5)/e**2 - 2*B*b**2*d*(-d**3/sqrt(d + e*x) - 3*d**2*sqrt(d + e*x) + d*(d + e*x)**(3
/2) - (d + e*x)**(5/2)/5)/e**3 - 2*B*b**2*(d**4/sqrt(d + e*x) + 4*d**3*sqrt(d + e*x) - 2*d**2*(d + e*x)**(3/2)
 + 4*d*(d + e*x)**(5/2)/5 - (d + e*x)**(7/2)/7)/e**3)/e, Ne(e, 0)), ((A*a**2*x + B*b**2*x**4/4 + x**3*(A*b**2
+ 2*B*a*b)/3 + x**2*(2*A*a*b + B*a**2)/2)/sqrt(d), True))

________________________________________________________________________________________

Giac [A]
time = 0.93, size = 215, normalized size = 1.71 \begin {gather*} \frac {2}{105} \, {\left (35 \, {\left ({\left (x e + d\right )}^{\frac {3}{2}} - 3 \, \sqrt {x e + d} d\right )} B a^{2} e^{\left (-1\right )} + 70 \, {\left ({\left (x e + d\right )}^{\frac {3}{2}} - 3 \, \sqrt {x e + d} d\right )} A a b e^{\left (-1\right )} + 14 \, {\left (3 \, {\left (x e + d\right )}^{\frac {5}{2}} - 10 \, {\left (x e + d\right )}^{\frac {3}{2}} d + 15 \, \sqrt {x e + d} d^{2}\right )} B a b e^{\left (-2\right )} + 7 \, {\left (3 \, {\left (x e + d\right )}^{\frac {5}{2}} - 10 \, {\left (x e + d\right )}^{\frac {3}{2}} d + 15 \, \sqrt {x e + d} d^{2}\right )} A b^{2} e^{\left (-2\right )} + 3 \, {\left (5 \, {\left (x e + d\right )}^{\frac {7}{2}} - 21 \, {\left (x e + d\right )}^{\frac {5}{2}} d + 35 \, {\left (x e + d\right )}^{\frac {3}{2}} d^{2} - 35 \, \sqrt {x e + d} d^{3}\right )} B b^{2} e^{\left (-3\right )} + 105 \, \sqrt {x e + d} A a^{2}\right )} e^{\left (-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)*(b^2*x^2+2*a*b*x+a^2)/(e*x+d)^(1/2),x, algorithm="giac")

[Out]

2/105*(35*((x*e + d)^(3/2) - 3*sqrt(x*e + d)*d)*B*a^2*e^(-1) + 70*((x*e + d)^(3/2) - 3*sqrt(x*e + d)*d)*A*a*b*
e^(-1) + 14*(3*(x*e + d)^(5/2) - 10*(x*e + d)^(3/2)*d + 15*sqrt(x*e + d)*d^2)*B*a*b*e^(-2) + 7*(3*(x*e + d)^(5
/2) - 10*(x*e + d)^(3/2)*d + 15*sqrt(x*e + d)*d^2)*A*b^2*e^(-2) + 3*(5*(x*e + d)^(7/2) - 21*(x*e + d)^(5/2)*d
+ 35*(x*e + d)^(3/2)*d^2 - 35*sqrt(x*e + d)*d^3)*B*b^2*e^(-3) + 105*sqrt(x*e + d)*A*a^2)*e^(-1)

________________________________________________________________________________________

Mupad [B]
time = 0.07, size = 115, normalized size = 0.91 \begin {gather*} \frac {{\left (d+e\,x\right )}^{5/2}\,\left (2\,A\,b^2\,e-6\,B\,b^2\,d+4\,B\,a\,b\,e\right )}{5\,e^4}+\frac {2\,B\,b^2\,{\left (d+e\,x\right )}^{7/2}}{7\,e^4}+\frac {2\,\left (a\,e-b\,d\right )\,{\left (d+e\,x\right )}^{3/2}\,\left (2\,A\,b\,e+B\,a\,e-3\,B\,b\,d\right )}{3\,e^4}+\frac {2\,\left (A\,e-B\,d\right )\,{\left (a\,e-b\,d\right )}^2\,\sqrt {d+e\,x}}{e^4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*x)*(a^2 + b^2*x^2 + 2*a*b*x))/(d + e*x)^(1/2),x)

[Out]

((d + e*x)^(5/2)*(2*A*b^2*e - 6*B*b^2*d + 4*B*a*b*e))/(5*e^4) + (2*B*b^2*(d + e*x)^(7/2))/(7*e^4) + (2*(a*e -
b*d)*(d + e*x)^(3/2)*(2*A*b*e + B*a*e - 3*B*b*d))/(3*e^4) + (2*(A*e - B*d)*(a*e - b*d)^2*(d + e*x)^(1/2))/e^4

________________________________________________________________________________________